Matthias Clasen [Thu, 21 Feb 2019 04:39:01 +0000 (23:39 -0500)]
notebook: Fix up issues with property notification
Matthias Clasen [Thu, 21 Feb 2019 04:05:37 +0000 (23:05 -0500)]
widget-factory: Use notebook pages in the ui file
This is the new way of doing things.
Matthias Clasen [Thu, 21 Feb 2019 04:03:32 +0000 (23:03 -0500)]
print dialog: Use notebook pages in ui file
This is the new way of doing things.
Matthias Clasen [Thu, 21 Feb 2019 03:48:58 +0000 (22:48 -0500)]
builder-tool: Rewrite notebooks
Just like we do for assistant and stack pages, rewrite
notebooks from child properties to child metas.
Matthias Clasen [Thu, 21 Feb 2019 03:25:54 +0000 (22:25 -0500)]
Implement position property somewhat
Matthias Clasen [Thu, 21 Feb 2019 04:02:39 +0000 (23:02 -0500)]
notebook: Fix up ref counting
We need to keep a ref to the page objects.
Matthias Clasen [Thu, 21 Feb 2019 02:46:20 +0000 (21:46 -0500)]
notebook: Add a pages model
Just like GtkStack and GtkAssistant, provide
a list model with the page objects.
Matthias Clasen [Wed, 20 Feb 2019 16:43:15 +0000 (11:43 -0500)]
Allow builder to add notebook pages
Matthias Clasen [Wed, 20 Feb 2019 13:39:21 +0000 (08:39 -0500)]
Turn labels into page properties
Matthias Clasen [Wed, 20 Feb 2019 04:03:22 +0000 (23:03 -0500)]
Add GtkNotebookPage properties
Matthias Clasen [Tue, 19 Feb 2019 23:44:40 +0000 (18:44 -0500)]
Make GtkNotebookPage an object
Matthias Clasen [Tue, 19 Feb 2019 23:28:53 +0000 (18:28 -0500)]
notebook: Rename an internal macro
Avoid a clash between GObject boilerplate and the
GTK_NOTEBOOK_PAGE() macro, by renaming it.
Matthias Clasen [Thu, 21 Feb 2019 02:45:11 +0000 (21:45 -0500)]
assistant: Remove weak pointer in finalize
Otherwise, bad things can happen later, if
somebody holds onto the list model.
Matthias Clasen [Thu, 21 Feb 2019 05:27:51 +0000 (00:27 -0500)]
css tests: Update expected output for entries
Flat is gone.
Matthias Clasen [Thu, 21 Feb 2019 04:20:27 +0000 (23:20 -0500)]
text: Remove has-frame leftovers
Matthias Clasen [Wed, 20 Feb 2019 18:10:33 +0000 (13:10 -0500)]
text: Make this a final class
No need to derive from it.
Matthias Clasen [Wed, 20 Feb 2019 18:10:09 +0000 (13:10 -0500)]
search entry: Quiet a compiler warning
Matthias Clasen [Wed, 20 Feb 2019 15:34:42 +0000 (10:34 -0500)]
text: Remove the ::has-frame property
This is purely GtkEntry functionality and should
remain there.
Matthias Clasen [Wed, 20 Feb 2019 15:32:12 +0000 (10:32 -0500)]
emoji chooser: Don't use entry api on search entries
Use editable api, and cut through to the text widget
where necessary.
Matthias Clasen [Wed, 20 Feb 2019 15:29:26 +0000 (10:29 -0500)]
search entry: Add private api to get the text widget
We need this to do some custom setup in the Emoji chooser.
Benjamin Otte [Wed, 20 Feb 2019 04:00:13 +0000 (05:00 +0100)]
widget: Mark compute functions as G_GNUC_WARN_UNUSED_RESULT
Lots of code does not error-check these functions, and when we add CSS
transforms, they will start failing. And we want people to check that.
Benjamin Otte [Wed, 20 Feb 2019 03:53:47 +0000 (04:53 +0100)]
gtk: Check return value of compute_bounds()
Half of these calls will completely break if anybody ever uses CSS
transforms with them, but hey...
Benjamin Otte [Wed, 20 Feb 2019 03:07:34 +0000 (04:07 +0100)]
widget: Always set out value
Don't leave memory in an unitinialized case when returning FALSE from
gtk_widget_compute_transform().
We both know that people are going to call that function without
checking the return value.
Benjamin Otte [Wed, 20 Feb 2019 03:05:37 +0000 (04:05 +0100)]
widget: Fail if matrix not invertible
Benjamin Otte [Wed, 20 Feb 2019 03:04:29 +0000 (04:04 +0100)]
widget: Add optimizations to gtk_widget_compute_transform()
Try to catch 2 common cases with as little work as necessary.
Benjamin Otte [Wed, 20 Feb 2019 02:46:28 +0000 (03:46 +0100)]
widget: Clean up gtk_widget_compute_transform()
The code was all over the place and being clear here is very useful.
Matthias Clasen [Wed, 20 Feb 2019 00:29:56 +0000 (19:29 -0500)]
Fix gtk_widget_compute_transform
We were collecting all the transforms from widget
up to ancestor, and then trying to collect the
ones from target to ancestor, but failing.
Benjamin Otte [Tue, 19 Feb 2019 07:09:57 +0000 (08:09 +0100)]
widget: Remove gtk_widget_get_allocated_size()
Use gtk_widget_get_allocated_width/height in the only user (GtkStack),
even though that isn't 100% correct.
Timm Bäder [Sat, 11 Aug 2018 20:19:13 +0000 (22:19 +0200)]
Add test for widget transforms
Benjamin Otte [Tue, 19 Feb 2019 18:15:16 +0000 (19:15 +0100)]
widget: Add gtk_widget_compute_point()
It's the replacement for gtk_widget_translate_coordinates()
Benjamin Otte [Tue, 19 Feb 2019 17:02:46 +0000 (18:02 +0100)]
Remove nonexisting function from header
Timm Bäder [Tue, 19 Feb 2019 07:51:51 +0000 (08:51 +0100)]
widget: Compute child point directly when picking
Timm Bäder [Tue, 19 Feb 2019 07:33:24 +0000 (08:33 +0100)]
widget: Remove unused function
Timm Bäder [Tue, 19 Feb 2019 07:25:49 +0000 (08:25 +0100)]
widget: Avoid some type checks in pick() and contains()
We've already verified that the given pointer is a proper GtkWidget, so
no need to do it all over again.
Timm Bäder [Tue, 19 Feb 2019 07:24:43 +0000 (08:24 +0100)]
widget: Add typecheck-less _is_sensitive
It adds up to a whopping 3% in gtk_widget_pick
Timm Bäder [Sun, 17 Feb 2019 07:47:09 +0000 (08:47 +0100)]
widget: Add gtk_widget_compute_transform
Timm Bäder [Tue, 19 Feb 2019 16:19:23 +0000 (17:19 +0100)]
widget: Use CSS boxes in gtk_widget_real_contains()
Matthias Clasen [Tue, 19 Feb 2019 16:22:33 +0000 (11:22 -0500)]
stack sidebar: Fix sorting
Fix sorting, by not sorting.
Matthias Clasen [Tue, 19 Feb 2019 12:35:14 +0000 (12:35 +0000)]
Merge branch 'portal-session-state-master' into 'master'
Portal session state
See merge request GNOME/gtk!587
Matthias Clasen [Tue, 22 Jan 2019 01:45:15 +0000 (20:45 -0500)]
application: Add a query-end signal
This lets us take just-in-time inhibitors, and makes
the session support a little more real.
Matthias Clasen [Sun, 20 Jan 2019 16:29:04 +0000 (11:29 -0500)]
Application: Support sandboxed session state changes
React to the session-state in StateChanged signals from
the inhibit portal and call QueryEndResponse as appropriate.
Benjamin Otte [Tue, 19 Feb 2019 05:47:35 +0000 (06:47 +0100)]
widget: Remove lefover debug code
According to someone involved with those lines, I suck at reviewing
their patches.
Matthias Clasen [Tue, 19 Feb 2019 05:45:44 +0000 (05:45 +0000)]
Merge branch 'text' into 'master'
GtkEntry reshuffling
Closes #1483
See merge request GNOME/gtk!585
Matthias Clasen [Tue, 19 Feb 2019 05:32:35 +0000 (00:32 -0500)]
search entry: Add a tooltip to th clear icon
Similar to what we do for the caps-lock warning in the
password entry.
Closes #1483
Matthias Clasen [Tue, 19 Feb 2019 05:10:24 +0000 (00:10 -0500)]
Mention GtkEditable and entries in the migration guide
Not a very exhaustive treatment, but at least it gives
some hints.
Matthias Clasen [Tue, 19 Feb 2019 04:42:06 +0000 (23:42 -0500)]
Add editable delegate api to docs
And add a section that explains how to use these
functions when setting up a GtkEditable delegate.
Matthias Clasen [Sun, 17 Feb 2019 23:18:20 +0000 (18:18 -0500)]
Fix testtreesort warnings
Matthias Clasen [Sun, 17 Feb 2019 20:52:33 +0000 (15:52 -0500)]
a11y text test: Use a GtkText instead
Matthias Clasen [Sun, 17 Feb 2019 20:52:10 +0000 (15:52 -0500)]
a11y tests: Update expected output
GtkText makes an appearance in many places now.
Matthias Clasen [Sun, 17 Feb 2019 20:51:31 +0000 (15:51 -0500)]
focus test: Use a GtkText instead
Thats where the focus is nowadays.
Matthias Clasen [Sun, 17 Feb 2019 20:50:59 +0000 (15:50 -0500)]
defaultvalue test: Exempt GtkText::buffer
It gets created on-demand, so isn't NULL.
Matthias Clasen [Sun, 17 Feb 2019 20:18:00 +0000 (15:18 -0500)]
testsuite: update css node tests
The entries have changed. Reflect that.
Matthias Clasen [Mon, 18 Feb 2019 19:23:14 +0000 (14:23 -0500)]
widget-factory: Don't set can-focus on entries
The focus needs to be on the text inside, now.
Matthias Clasen [Sun, 17 Feb 2019 19:48:44 +0000 (14:48 -0500)]
file chooser: Use editable api on the search entry
Matthias Clasen [Sun, 17 Feb 2019 19:48:08 +0000 (14:48 -0500)]
font chooser: Use editable api on search entry
Matthias Clasen [Sun, 17 Feb 2019 19:47:53 +0000 (14:47 -0500)]
app chooser: Use editable api on search entry
Matthias Clasen [Sun, 17 Feb 2019 21:13:58 +0000 (16:13 -0500)]
Fix the search bar example
More GtkSearchBar entry -> editable fixups.
Matthias Clasen [Sun, 17 Feb 2019 04:59:39 +0000 (23:59 -0500)]
gtk-demo: Make the delayed search demo work
Make this demo work with the new search entry.
Matthias Clasen [Sun, 17 Feb 2019 04:58:54 +0000 (23:58 -0500)]
inspector: Work with new search entry
Don't assume a search entry is an entry, and
use the editable api as far as possible.
Matthias Clasen [Sun, 17 Feb 2019 04:56:15 +0000 (23:56 -0500)]
treeview: make search work
Make search work with both GtkEntry and GtkSearchEntry,
even if a GtkSearchEntry is not derived from GtkEntry
anymore.
Matthias Clasen [Sun, 17 Feb 2019 04:58:06 +0000 (23:58 -0500)]
search bar: Work with the new GtkSearchEntry
Don't assume a search entry is an entry, and use
the editable api as far as possible.
Matthias Clasen [Sun, 17 Feb 2019 04:57:18 +0000 (23:57 -0500)]
search entry: Use a GtkText
Matthias Clasen [Sun, 17 Feb 2019 03:22:43 +0000 (22:22 -0500)]
Add a test for GtkPassworkEntry
Matthias Clasen [Sun, 17 Feb 2019 03:21:57 +0000 (22:21 -0500)]
Add GtkPasswordEntry
This is a simple editable which hides the entered
text and shows a caps-lock warning.
Matthias Clasen [Mon, 18 Feb 2019 04:03:27 +0000 (23:03 -0500)]
entry completion: Make this work again
Connect to GtkText signals where necessary.
Matthias Clasen [Sat, 16 Feb 2019 17:29:48 +0000 (12:29 -0500)]
treeview: use a GtkText as search entry
Matthias Clasen [Sat, 16 Feb 2019 05:53:09 +0000 (00:53 -0500)]
treeview: Disable some search entry functionality
This needs to be rewritten. Until then, keep it limping along.
Matthias Clasen [Sat, 16 Feb 2019 05:52:20 +0000 (00:52 -0500)]
search entry: temporarily disable some functions
The search entry needs to be rewritten to use a
text child until then, keep it limping along.
Matthias Clasen [Sat, 16 Feb 2019 02:01:33 +0000 (21:01 -0500)]
spin button: Use GtkText
We already use GtkEditable api throughout. This just
means we create a GtkText instead of a GtkEntry.
Matthias Clasen [Sat, 16 Feb 2019 05:50:12 +0000 (00:50 -0500)]
entry accessible: Make this work with the text widget
Matthias Clasen [Sat, 16 Feb 2019 05:50:40 +0000 (00:50 -0500)]
entry: Delegate to GtkText
Use a GtkText child, and delegate the editable functionality
to it. Also forward all the properties that are provided by
GtkText.
Some of the more internal APIs, such as layout and im context
access and caps-lock warning, are removed here, but we preserve
most of the plain GtkEntry API by forwarding it to the GtkText
child.
Benjamin Otte [Tue, 19 Feb 2019 04:50:49 +0000 (05:50 +0100)]
widget: Fix gtk_widget_size_allocate()
Compute the matrix for adjusted sizes etc properly.
Benjamin Otte [Tue, 19 Feb 2019 03:16:00 +0000 (04:16 +0100)]
recorder: Print the matrix for transform nodes
Matthias Clasen [Sat, 16 Feb 2019 02:30:36 +0000 (21:30 -0500)]
Add a GtkTextAccessible
Add an accessible implementation for GtkText.
Matthias Clasen [Fri, 15 Feb 2019 20:46:51 +0000 (15:46 -0500)]
Make emoji completion work for GtkText
GtkEntry will stop using it directly in the following commits.
Matthias Clasen [Thu, 14 Feb 2019 01:16:12 +0000 (20:16 -0500)]
Add a GtkText widget
This is a GtkEntry without any of the extras, such as
icons, completion, progress, caps-lock warning, emoji icon.
Matthias Clasen [Thu, 14 Feb 2019 05:54:07 +0000 (00:54 -0500)]
spin button: Implement and use editable interface
Matthias Clasen [Thu, 14 Feb 2019 04:07:36 +0000 (23:07 -0500)]
entry: Implement new editable iface
Matthias Clasen [Thu, 14 Feb 2019 01:16:33 +0000 (20:16 -0500)]
editable: Add more to interface
Add all the things to the GtkEditable interface that
make sense for most implementations.
Matthias Clasen [Sun, 17 Feb 2019 20:36:45 +0000 (15:36 -0500)]
a11y: Update assistant test output
This changed as part of the recent cleanup that removed
some internal boxing.
Timm Bäder [Thu, 14 Feb 2019 06:11:34 +0000 (07:11 +0100)]
flowbox: Implement get_child_at_pos properly
With transforms in the mix, checking if the coordinate is inside the
widget "allocation" makes even less sense. Just use gtk_widget_pick()
and walk up until we find a GtkFlowBoxChild.
Timm Bäder [Sat, 16 Feb 2019 14:29:05 +0000 (15:29 +0100)]
widget: Push a transform node if we need to
This is the same as the old code since the transformation only contains
teh offset right now, but it will be different later where arbitrary
transformations are possible per widget.
Timm Bäder [Sat, 16 Feb 2019 13:40:49 +0000 (14:40 +0100)]
widget: Save transform as matrix
The transform matrix is a translation matrix from the parent's origin to
the widget origin. We will later allow more transformations than just
translations.
Timm Bäder [Wed, 13 Feb 2019 14:37:54 +0000 (15:37 +0100)]
paned: Implement increased handle area using pick()
Otherwise, we do report the widgets below the invisible handle area as
hovered or active.
Matthias Clasen [Fri, 15 Feb 2019 16:12:26 +0000 (16:12 +0000)]
Merge branch 'wip/otte/boxes' into 'master'
GtkCssBoxes
See merge request GNOME/gtk!584
Matthias Clasen [Fri, 15 Feb 2019 15:54:53 +0000 (15:54 +0000)]
Merge branch 'assistant-cleanup' into 'master'
Assistant cleanup
See merge request GNOME/gtk!581
Matthias Clasen [Thu, 14 Feb 2019 19:46:01 +0000 (14:46 -0500)]
Drop GtkAssistantPage::has-padding
This is causing us some internal complications, and
it is very easy to just add padding to the pages
yourself.
Matthias Clasen [Thu, 14 Feb 2019 19:07:46 +0000 (14:07 -0500)]
assistant: Use a stack
We don't use any non-stack features of the notebook here.
Matthias Clasen [Thu, 14 Feb 2019 19:29:54 +0000 (14:29 -0500)]
assistant: Add docs
Without this, introspection complains about a missing
transfer annotation.
Matthias Clasen [Fri, 15 Feb 2019 15:20:48 +0000 (10:20 -0500)]
singleselection: Make tests build without warnings
Benjamin Otte [Fri, 15 Feb 2019 05:15:50 +0000 (06:15 +0100)]
css: Pass boxes to the render functions
Instead of style + rect_of_one_box, pass the new GtkCssBoxes object.
This has the nice side effect that when drawing background + border +
outline, we only compute all the boxes we need once.
Benjamin Otte [Fri, 15 Feb 2019 03:06:22 +0000 (04:06 +0100)]
css: Mark some hot functions as G_GNUC_PURE
By doing that, gcc will generate code that avoids calling these
functions when not needed.
Benjamin Otte [Fri, 15 Feb 2019 02:49:05 +0000 (03:49 +0100)]
widget: Make width, height and transform be widget-relative
Previously, those numbers stored the values relative to the margin box
of the widget. Now they store values relative to the content box,
thereby getting rid of the last remains of weird coordinate systems.
Benjamin Otte [Fri, 15 Feb 2019 01:57:46 +0000 (02:57 +0100)]
cssboxes: Introduce
Split out the code for computing CSS boxes from given variables from the
background render code. This way, it can be shared between different
codebases.
Also, make that code completely be contained of static inline functions.
That ensures that it can be 100% inlined in cases where only parts of
the rectangle are needed (like in gtk_widget_get_width() in the future).
This will require some more patches to actually work, but those will
follow.
Benjamin Otte [Sun, 10 Feb 2019 05:26:41 +0000 (06:26 +0100)]
widget: Store the render node in the widget's coordinate system
Also require gtk_widget_snapshot() to be in the widget's coordinate
system.
Benjamin Otte [Sun, 10 Feb 2019 00:06:39 +0000 (01:06 +0100)]
root: Move the renderer to the root
Benjamin Otte [Sat, 9 Feb 2019 21:15:32 +0000 (22:15 +0100)]
root: Add gtk_root_get_surface_transform()
The function isn't used yet, so this is just infrastructure.
Benjamin Otte [Sun, 29 Jul 2018 02:11:14 +0000 (04:11 +0200)]
root: Add GtkRoot:get_display vfunc
And use it.
Benjamin Otte [Sun, 29 Jul 2018 01:40:52 +0000 (03:40 +0200)]
widget: Add a GtkWidget::root property and gtk_widget_get_root()
The property is just for API completeness, the getter is meant to
replace toplevel usage.
Benjamin Otte [Sun, 29 Jul 2018 01:31:36 +0000 (03:31 +0200)]
widget: Add GtkWidgetClass:root and :unroot functions
They get added whenever a widget gets added into a hierarchy with a root
widget.